import Vue from 'vue'
import Router from 'vue-router'
import index from '../view/home/index'
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
Vue.use(Router)

export default new Router({
	routes: [{
		path: '/',
		name: 'Login',
		component: () => import('@/view/login')
	}, 
	{
		path: '/home/member',
		name: 'member',
		component: () => import('@/view/home/member')
	}, 
	{
		path: '/home',
		component: index,
		children:[{
			path:'/home',
			name: 'home',
			component: () => import('@/view/home/welcome')
		}]
	}, 
	{
		path: '/chart',
		component: index,
		children:[{
			path:'/chart',
			name: 'chart',
			component: () => import('@/view/chart/index')
		}]
	}
	]
})
